{% extends 'layout/base.html' %}
{% block title %} 首页 {% endblock %}
{% block main %}
<div class="row justify-content-center">
    <div class="col-md-8">
        <h1 class="">首页</h1>
        <div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
            <ol class="carousel-indicators">
                <li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
                <li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
                <li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
            </ol>
            <div class="carousel-inner">
                {% for item in config.get("INDEX_CAROUSELS", []) %}
                <div class="carousel-item {% if item['tag'] == 'active'  %} active {% endif %}">
                    <a href="{{item['href']}}"><img src="{{ item['url'] }}" class="d-block w-100"
                            alt="{{item['title']}}"></a>
                    <div class="carousel-caption d-none d-md-block">
                        <h5>{{ item['title'] }}</h5>
                        <p>{{item['text']}}</p>
                    </div>
                </div>
                {% endfor %}
            </div>
            <button style="background-color: unset; border: none;" class="carousel-control-prev" type="button"
                data-target="#carouselExampleCaptions" data-slide="prev">
                <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </button>
            <button style="background-color: unset; border: none;" class="carousel-control-next" type="button"
                data-target="#carouselExampleCaptions" data-slide="next">
                <span class="carousel-control-next-icon" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </button>
        </div>
        <hr>
        <div>
            <h3>
                推荐
            </h3>
            <ul class="list-group">
                <li class="list-group-item">
                    <!-- <span class="badge">14</span> -->
                    <b>推荐? 推荐个屁！ </b>
                </li>
            </ul>
        </div>
    </div>
</div>


{% endblock %}